package com.wondertek.poms.service.vo;

import com.wondertek.poms.common.utils.validate.GroupType;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.groups.Default;

/**
 * @author:W5349
 * @date:2021/1/27
 */
@Data
public class SpInfoVo {

    private Long id;

    /*sp编号*/
    @Range(message = "sp编号仅支持6位数字",min = 100000, max = 999999 , groups = {Default.class, GroupType.Update.class})
    private Long spId;

    /*sp名称*/
    @NotBlank(message = "sp名称不能为空", groups = {Default.class})
    @Length(message = "sp名称长度不能超过30个字节", max=30, groups = {Default.class, GroupType.Update.class})
    private String name;
}
